package interfaz;



import javax.swing.JFrame;
import javax.swing.JLabel;
import java.awt.BorderLayout;
import java.awt.GridBagLayout;
import java.awt.GridBagConstraints;
import javax.swing.JButton;
import java.awt.Insets;
import javax.swing.BoxLayout;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class RESULTADO {

	private JFrame frame;
	JFrame frmRc;

	

	/**
	 * Create the application.
	 * @param frmRcv 
	 */
	public RESULTADO(JFrame frmRcv, String reporte)
	{
		frmRc=frmRcv;
		initialize(reporte);
		this.frame.setVisible(true);
	}

	/**
	 * Initialize the contents of the frame.
	 * @param frmRcv 
	 */
	private void initialize( String r) {
		frame = new JFrame();
		frame.setTitle("RCV");
		frame.setResizable(false);
		frame.setAlwaysOnTop(true);
		frame.setBounds(100, 100, 310, 293);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.getContentPane().setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
		
		JLabel lblSeHaHecho = new JLabel("Se ha hecho ese reporte");
		frame.getContentPane().add(lblSeHaHecho);
		
		JLabel label = new JLabel(r);
		frame.getContentPane().add(label);
		
		JButton btnVolver = new JButton("Volver");
		
		 btnVolver.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) 
			{
				frame.setVisible(false)	;
				frmRc.setVisible(true);
			}
		});
		frame.getContentPane().add(btnVolver);
	}

}
